<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <demo>
            <template v-slot:header>
                <h1>标题</h1>
            </template>
            <template v-slot:nav>
                <h1>导航</h1>
            </template>
            <template v-slot:content>
                <h1>内容区域</h1>
            </template>
            <template v-slot:bottom>
                <h1>底部区域</h1>
            </template>
        </demo>

    </div>
    <template id="temp">
        <div>
            <section>
                <slot name="header"></slot>
            </section>
            <section>
                <slot name="nav"></slot>
            </section>
            <h1>插槽的例子</h1>
            <section>
                <slot name="content"></slot>
            </section>
            <section>
                <slot name="bottom"></slot>
            </section>
        </div>
    </template>
    <script src="vue.js"></script>
    <script>
        Vue.component("demo", {
            template: "#temp",

        })

        let vm = new Vue({
            el: "#app",


        })
    </script>
</body>

</html>